/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author YDZ
 */
import { defHttp } from '/@/utils/http/axios';
import { useGlobSetting } from '/@/hooks/setting';
import { BasicModel, Page } from '../model/baseModel';

const { adminPath } = useGlobSetting();

export interface PmWastepipeData extends BasicModel<PmWastepipeData> {
  projectno?: string; // 项目编号
  projectname?: string; // 项目名称
  caddr?: string; // 地址
  breuse?: string; // 废管利旧
  dealType?: string; // 管道去向
  pipeDesc?: string; // 管道规格（DN）及管道长度（m）
  dealRemarks?: string; // 管道利旧备注
  createByName?: string; // 发起人名称
}

export const pmWastepipeDataList = (params?: PmWastepipeData | any) =>
  defHttp.get<PmWastepipeData>({ url: adminPath + '/process/pipe/pmWastepipeData/list', params });

export const pmWastepipeDataListData = (params?: PmWastepipeData | any) =>
  defHttp.post<Page<PmWastepipeData>>({
    url: adminPath + '/process/pipe/pmWastepipeData/listData',
    params,
  });

export const pmWastepipeDataForm = (params?: PmWastepipeData | any) =>
  defHttp.get<PmWastepipeData>({ url: adminPath + '/process/pipe/pmWastepipeData/form', params });

export const pmWastepipeDataSave = (params?: any, data?: PmWastepipeData | any) =>
  defHttp.postJson<PmWastepipeData>({
    url: adminPath + '/process/pipe/pmWastepipeData/save',
    params,
    data,
  });

export const pmWastepipeDataDelete = (params?: PmWastepipeData | any) =>
  defHttp.get<PmWastepipeData>({ url: adminPath + '/process/pipe/pmWastepipeData/delete', params });

export const pmWastepipeDataUploadFile = (params?: PmWastepipeData | any) =>
  defHttp.get<PmWastepipeData>({
    url: adminPath + '/process/pipe/pmWastepipeData/uploadFile',
    params,
  });
